<%@page import="member.vo.MemberVO"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"   pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Insert title here</title>
	<link rel="stylesheet" type="text/css" href="css/user_css.css">
	<script type="text/javascript">
	function modifyCheck(){
	 
		 var pwd = document.modify_form.password;
		 var name = document.modify_form.name;
		 var registerNumber1 = document.modify_form.registerNumber1;
		 var registerNumber2 = document.modify_form.registerNumber2;
		 
		 if(pwd.value==""){
			  alert("비밀번호를 입력해 주세요.");
			  pwd.focus();
			  return false;
		 }
		 if(name.value==""){
			  alert("이름을 입력해 주세요.");
			  name.focus();
			  return false;
		 }
		 if(registerNumber1.value==""){
			  alert("주민번호를 입력해 주세요.");
			  registerNumber1.focus();
			  return false;
		 }
		 if(registerNumber2.value==""){
			  alert("주민번호를 입력해 주세요.");
			  registerNumber2.focus();
			  return false;
		 }
		 if(registerNumber1.value.length!=6){
			  alert("주민번호 앞자리 6자리를 입력해 주세요.");
			  registerNumber1.focus();
			  return false;
		 }
		 if(registerNumber2.value.length!=7){
			  alert("주민번호 뒷자리 7자리를 입력해 주세요.");
			  registerNumber1.focus();
			  return false;
		 }
	}
	</script>
</head>
 
<body>
<div id="wrap">
	<div id="header">
	    <jsp:include page="/menu.jsp"></jsp:include>
	</div>
	
	<div id="centerCon">
	
    <form action="/${initParam.context_root }/modifyMember.do" method="post" name="modify_form" onsubmit="return modifyCheck()">

	<input type="hidden" name="command" value="member_modify">
	<%-- <input type="hidden" name="id" value="${sessionScope.memberVO.id }"> --%>
	
	
	<br><br><br><br>
	<center>
	<fieldset>
	<legend>회원정보수정</legend>
	<table>
	     <tr> 
			 	<td colspan="2" align="center" >&nbsp;&nbsp;    </td> 
		</tr>
		<tr>
		 	<td size="50"  align="center" bgcolor="#CCCCCC">아이디</td>
		 	<td size="150" align="left"  style="width:80px;">
		 	    <input type="text" maxlength="10" name="id"  readonly value="${sessionScope.memberVO.id }" />
		 	</td>    
		</tr>
		<tr>
		 	<td size="50"  align="center" bgcolor="#CCCCCC">비밀번호</td>
		 	<td size="150" align="left" style="width:80px;">
		 	    <input type="text" maxlength="10" name="password" value="${sessionScope.memberVO.password }" />
		 	</td>
		</tr>
		<tr>
		 	<td size="50"  align="center" bgcolor="#CCCCCC">이름</td>
		 	<td size="150" align="left" style="width:80px;">
		 	    <input type="text" maxlength="10" name="name" value="${sessionScope.memberVO.name }"/>
		 	</td>
		</tr>
		<tr>
		 	<td size="50"  align="center" bgcolor="#CCCCCC">주민번호</td>
		 	<td size="150" align="left" >
		 	     <input type="text" style="width:65px;" maxlength="6" name="registerNumber1" value="${sessionScope.memberVO.registerNumber1 }" />-
		 	     <input type="text" style="width:65px;" maxlength="7" name="registerNumber2" value="${sessionScope.memberVO.registerNumber2 }" />
		 	</td>
		</tr>
		
		 <tr> 
			 <td colspan="2" align="center" >&nbsp;&nbsp;    </td> 
		</tr>
		<tr>
		 	<td colspan="2" align="center">
		 	  <input type="submit" value="정보수정">
		 	  <input type="reset" value="다시작성">
		 	</td>
		</tr>
	</table>
	</fieldset>
	</center>
    </form>
	</div>
	
	<div id="footer">
		<jsp:include page="/footer.jsp"></jsp:include>   
	</div>
</div>

</body>
</html>
